package edu.ipfw.cs590.cheat.services;
/*
 * Course:    CS 590 Web Services
 * Semseter:  Spring 2009
 * Professor: Sedlemeyer
 * Project:   CHEAT (Code Help Educational Assignment Tool)
 * Due Date:  May 1, 2009
 * Team:      Sarcasm
 *            (Baker, Jason; Mitchell, Robin; Shie, Keith)
 */


/**
 *
 * @author rrm46582
 */
public class AccessRights
{
    private UserRights rights;


   public AccessRights()
   {
       
   }

   public AccessRights(String r)
   {
       if ( r.compareToIgnoreCase(UserRights.toString(UserRights.Administrator)) == 0)
           setRights(UserRights.Administrator);
       else if ( r.compareToIgnoreCase(UserRights.toString(UserRights.Instructor)) == 0)
           setRights(UserRights.Instructor);
       else if ( r.compareToIgnoreCase(UserRights.toString(UserRights.Student)) == 0)
           setRights(UserRights.Student);
   }

    public AccessRights(UserRights r)
    {
        setRights(r);
    }

    public UserRights getRights()
    {
        return rights;
    }

    public void setRights(UserRights r)
    {
        rights = r;
    }
}
